package org.myxdb.server.message;

import java.util.HashMap;
import java.util.Map;

import org.myxdb.core.database.database;

public class DeleteDB implements RPCMessage{

	 public Map execute(Map message) {
		 
		 String dbname = (String)message.get("dbname");
		 
		 Map result = new HashMap(); 
		 if(new database().deletedb(dbname))
		 {
			 result.put("result", "Delete Database "+dbname+" successfully");
		 }
		 else
			 result.put("result", "Fail to Delete Database "+dbname);
		 return result;
	 }
}
